import service from "./request.js";

export default {
  // 删除角色用户
  dropUserRole(query) {
    return service({
      method: "POST",
      url: "/admin-api/system/permission/drop-user-role",
      data: query,
    });
  },
  // 赋予角色用户
  assignUserRole(query) {
    return service({
      method: "POST",
      url: "/admin-api/system/permission/assign-user-role",
      data: query,
    });
  },
  // 赋予角色菜单
  assignRoleMenu(query) {
    return service({
      method: "POST",
      url: "/admin-api/system/permission/assign-role-menu",
      data: query,
    });
  },
  // 获得拥有此角色的用户列表
  listRoleUsers(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/permission/list-role-users",
      params: query,
    });
  },
  // 获得角色拥有的菜单编号
  listRoleMenu(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/permission/list-role-menus",
      params: query,
    });
  },
  // 获得未拥有此角色的用户列表
  listNoRoleMenu(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/permission/list-no-role-users",
      params: query,
    });
  },
  // 获取菜单精简信息列表
  listAllMenu(query) {
    return service({
      method: "GET",
      url: "/admin-api/system/menu/list-all-simple",
      params: query,
    });
  },
  // 获得认证审核分页列表
  authUserPage(query) {
    return service({
      method: "POST",
      url: "/admin-api/system/user-auth/page",
      data: query,
    });
  },
  // 审核用户
  authUserExamine(query) {
    return service({
      method: "POST",
      url: "/admin-api/system/user-auth/examine",
      data: query,
    });
  },
};
